﻿<UserControl
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
	xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
	mc:Ignorable="d"
	xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity" 
	xmlns:local="clr-namespace:BeeHive"
	xmlns:ic="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
    xmlns:im="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
	x:Class="BeeHive.BlockControl"
	DataContext="{Binding RelativeSource={RelativeSource Self}}"
	d:DesignWidth="52" d:DesignHeight="48">
	
	<i:Interaction.Behaviors>
		<local:CollisionBehavior/>
		<local:MovableBehavior/>
	</i:Interaction.Behaviors>
	<i:Interaction.Triggers>
		<local:CollisionTrigger>
			<local:RemoveCollisionElementAction/>
			<local:GameScoreAction/>
			<!--<im:PlaySoundAction Source="Audio/block.mp3"/>-->
		</local:CollisionTrigger>
	</i:Interaction.Triggers>

	<Grid x:Name="LayoutRoot">
        <!--
		<i:Interaction.Triggers>
			<local:CollisionTrigger>
				<ic:ChangePropertyAction PropertyName="Opacity"/>
			</local:CollisionTrigger>
		</i:Interaction.Triggers>
        -->
		<Image Source="{Binding ImageSource}" RenderTransformOrigin="0.5,0.5"/>
	</Grid>
</UserControl>